package self.hoy.demo.grainmall.order.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import self.hoy.demo.common.ServiceProviderName;

/**
 * 用于测试负载均衡
 * @author hyh
 * @date 2020/7/5
 */
@RestController
@RequestMapping("/test")
public class TestLoadBalanceController {
    @Value("${server.port}")
    private String port;

    @GetMapping("/port")
    public String port(){
        return ServiceProviderName.ORDER + " running at : " + port;
    }
}
